package com._101aiot.web.exception;

import com._101aiot.common.resultutil.IResultCode;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 基础异常
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class BaseException extends RuntimeException {

    private String code;
    private String message;
    private Object data;


    public BaseException(IResultCode resultCode, Object obj) {
        this.code = resultCode.getCode();
        this.message = resultCode.getMessage();
        this.data = obj;
    }

}
